#ifndef MINI_BASIC_FOR_LOOP_H
#define MINI_BASIC_FOR_LOOP_H

#pragma once

#include "stdafx.h"

namespace MiniBasic
{
    struct Variable;

    struct ForLoop
    {
        mbint increment;
        mbint loopDeclLine; // the line that contains the actual for declaration
        ULONG_PTR loopBodyStart; // the start position of the body (file byte position, not line)
        mbint exitCondition;
        Variable* var;
        bool beenReplaced;

        ForLoop() : increment(0), loopBodyStart(0), exitCondition(0), var(0){}

        ForLoop(mbint increment, mbint loopDeclLine, ULONG_PTR loopBodyStart, mbint exitCondition, Variable* var)
            : increment(increment),
            loopDeclLine(loopDeclLine),
            loopBodyStart(loopBodyStart),
            exitCondition(exitCondition),
            var(var),
            beenReplaced(false)
        {}
    };
}

#endif
